def judge(score):
    if 90 <= score <= 100:
        return 'A'
    elif 80 <= score <= 89:
        return 'B'
    elif 70 <= score <= 79:
        return 'C'
    elif 60 <= score <= 69:
        return 'D'
    elif 0 <= score <= 59:
        return 'E'
    else:
        return '成绩有误'



class Student:
    def __init__(self, name, math_score, chinese_score, english_score):
        self._english_level = None
        self._chinese_level = None
        self._math_level = None
        self._name = name
        self._math_score = math_score
        self._chinese_score = chinese_score
        self._english_score = english_score

    def scoring(self):
        self._math_level = judge(self._math_score)
        self._chinese_level = judge(self._chinese_score)
        self._english_level = judge(self._english_score)

    def display(self):
        self.scoring()
        print('学生姓名为:', self._name)
        print('数学成绩为:', self._math_level)
        print('语文成绩为', self._chinese_level)
        print('英语成绩为:', self._english_level)


s1 = Student("小明", 89, 75, 90)
s2 = Student("小强", 99, 45, 70)
s1.display()
s2.display()
